<template lang="ejs" type="html">
    <div class="c-pcScroll clearfix">
        <slot></slot>
    </div>
</template>
<script>
    import PerfectScrollbar from 'perfect-scrollbar';
    import "perfect-scrollbar/css/perfect-scrollbar.css";
    export default {
        name:'sroll',
        props:{
            data:""
        },
        mounted(){
           this.PS = new PerfectScrollbar(this.$el.parentNode)
        },
        data(){
            return{
                PS:{}
            }
        },
        scrollWhere(num = 0){
            this.$el.scrollTop = 0;
        },
        methods:{
            update(){
                this.PS.update();
            }
        },
        watch:{
            data:function () {
                this.update()
            }
        }
    }
</script>
<style></style>
